<html>
    <head>
      <link rel="stylesheet" href="../node_modules/xterm/dist/xterm.css" />
      <script src="../node_modules/xterm/dist/xterm.js"></script>
    </head>
    <body>
      <div id="terminal"></div>
      <script>
        var term = new Terminal();
        term.open(document.getElementById('terminal'));
        term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')

        term.on('key', (key, ev) => {
        if (key.charCodeAt(0) == 13)
            term.write('\n');
        term.write(key);
});
      </script>
    </body>
  </html>